Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

SORTITER(x, y) → EMPTY(x)
IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF(false, x, y, z) → TAIL(x)
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
IF(false, x, y, z) → REPLACE(min(x), head(x), tail(x))
LE(s(n), s(m)) → LE(n, m)
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF(false, x, y, z) → SORTITER(replace(min(x), head(x), tail(x)), z)
EQ(s(n), s(m)) → EQ(n, m)
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
SORT(x) → SORTITER(x, nil)
SORTITER(x, y) → MIN(x)
IF(false, x, y, z) → HEAD(x)
MIN(cons(n, cons(m, x))) → LE(n, m)
REPLACE(n, m, cons(k, x)) → EQ(n, k)
IF(false, x, y, z) → MIN(x)
SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SORTITER(x, y) → EMPTY(x)
IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF(false, x, y, z) → TAIL(x)
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
IF(false, x, y, z) → REPLACE(min(x), head(x), tail(x))
LE(s(n), s(m)) → LE(n, m)
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF(false, x, y, z) → SORTITER(replace(min(x), head(x), tail(x)), z)
EQ(s(n), s(m)) → EQ(n, m)
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
SORT(x) → SORTITER(x, nil)
SORTITER(x, y) → MIN(x)
IF(false, x, y, z) → HEAD(x)
MIN(cons(n, cons(m, x))) → LE(n, m)
REPLACE(n, m, cons(k, x)) → EQ(n, k)
IF(false, x, y, z) → MIN(x)
SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 5 SCCs with 9 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LE(s(n), s(m)) → LE(n, m)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


LE(s(n), s(m)) → LE(n, m)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(s(x1)) = 1/2 + (13/4)x_1   
POL(LE(x1, x2)) = (15/4)x_2   
The value of delta used in the strict ordering is 15/8.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(cons(x1, x2)) = 5/2 + (9/4)x_2   
POL(IF_MIN(x1, x2)) = (3/2)x_2   
POL(le(x1, x2)) = 0   
POL(MIN(x1)) = 1/4 + (2)x_1   
POL(true) = 5/4   
POL(false) = 4   
POL(s(x1)) = 1/2 + (3/4)x_1   
POL(0) = 4   
The value of delta used in the strict ordering is 69/16.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ(s(n), s(m)) → EQ(n, m)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


EQ(s(n), s(m)) → EQ(n, m)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(EQ(x1, x2)) = (15/4)x_2   
POL(s(x1)) = 1/2 + (13/4)x_1   
The value of delta used in the strict ordering is 15/8.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(cons(x1, x2)) = 1/2 + (4)x_1 + (4)x_2   
POL(eq(x1, x2)) = (1/2)x_2   
POL(REPLACE(x1, x2, x3)) = 2 + (2)x_3   
POL(true) = 15/4   
POL(false) = 0   
POL(s(x1)) = 3   
POL(IF_REPLACE(x1, x2, x3, x4)) = 7/4 + x_4   
POL(0) = 5/4   
The value of delta used in the strict ordering is 1/4.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → SORTITER(replace(min(x), head(x), tail(x)), z)
SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF(false, x, y, z) → SORTITER(replace(min(x), head(x), tail(x)), z)
The remaining pairs can at least be oriented weakly.

SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))
Used ordering: Polynomial interpretation [25,35]:

POL(empty(x1)) = (1/4)x_1   
POL(eq(x1, x2)) = (4)x_1 + x_2   
POL(tail(x1)) = (1/2)x_1   
POL(le(x1, x2)) = 4 + (7/4)x_1 + (1/2)x_2   
POL(head(x1)) = 7/4 + (1/4)x_1   
POL(true) = 0   
POL(SORTITER(x1, x2)) = 13/4 + (4)x_1   
POL(append(x1, x2)) = 4 + (3)x_1 + x_2   
POL(0) = 0   
POL(cons(x1, x2)) = 1 + (4)x_2   
POL(false) = 1/4   
POL(s(x1)) = 1 + (5/2)x_1   
POL(if_replace(x1, x2, x3, x4)) = x_4   
POL(min(x1)) = (5/4)x_1   
POL(nil) = 0   
POL(replace(x1, x2, x3)) = x_3   
POL(IF(x1, x2, x3, x4)) = 13/4 + (4)x_1 + (3)x_2   
POL(if_min(x1, x2)) = 7/2 + (4)x_2   
The value of delta used in the strict ordering is 1.
The following usable rules [17] were oriented:

empty(nil) → true
empty(cons(n, x)) → false
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
tail(cons(n, x)) → x
tail(nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
replace(n, m, nil) → nil



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.